<template>
	<view>
		<cu-custom bgColor="bg-gradual-orange" :isBack="true">
			<block slot="content">商家签约二维码</block>
		</cu-custom>
		<view class="qrcode">
			<image :src="sign_url"></image>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	import merchant from '@/api/merchant'
	export default {
		data() {
			return {
				sign_url: ''
			}
		},
		onLoad(opts) {
			this.getDetail()
		},
		methods: {
			getDetail(id) {
				merchant.sign_url().then(res => {
					if (res.code === 1) {
						this.sign_url = res.data;
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.qrcode {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 40%;

		.text {
			margin-bottom: 20px;
			font-size: 20px;
		}

		image {
			width: 300px;
			height: 300px;
		}
	}
</style>